Optimal. Leaf size=89 \[ -\frac {a^2}{12 x^2}-\frac {a \tanh ^{-1}(a x)}{6 x^3}+\frac {a^3 \tanh ^{-1}(a x)}{2 x}-\frac {\left (1-a^2 x^2\right )^2 \tanh ^{-1}(a x)^2}{4 x^4}-\frac {1}{3} a^4 \log (x)+\frac {1}{6} a^4 \log \left (1-a^2 x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 8, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6155, 6161,
6037, 272, 46, 36, 29, 31} \begin {gather*} -\frac {1}{3} a^4 \log (x)+\frac {a^3 \tanh ^{-1}(a x)}{2 x}-\frac {a^2}{12 x^2}-\frac {\left (1-a^2 x^2\right )^2 \tanh ^{-1}(a x)^2}{4 x^4}+\frac {1}{6} a^4 \log \left (1-a^2 x^2\right )-\frac {a \tanh ^{-1}(a x)}{6 x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 46
Rule 272
Rule 6037
Rule 6155
Rule 6161
Rubi steps
\begin {align*} \int \frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)^2}{x^5} \, dx &=-\frac {\left (1-a^2 x^2\right )^2 \tanh ^{-1}(a x)^2}{4 x^4}+\frac {1}{2} a \int \frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)}{x^4} \, dx\\ &=-\frac {\left (1-a^2 x^2\right )^2 \tanh ^{-1}(a x)^2}{4 x^4}+\frac {1}{2} a \int \frac {\tanh ^{-1}(a x)}{x^4} \, dx-\frac {1}{2} a^3 \int \frac {\tanh ^{-1}(a x)}{x^2} \, dx\\ &=-\frac {a \tanh ^{-1}(a x)}{6 x^3}+\frac {a^3 \tanh ^{-1}(a x)}{2 x}-\frac {\left (1-a^2 x^2\right )^2 \tanh ^{-1}(a x)^2}{4 x^4}+\frac {1}{6} a^2 \int \frac {1}{x^3 \left (1-a^2 x^2\right )} \, dx-\frac {1}{2} a^4 \int \frac {1}{x \left (1-a^2 x^2\right )} \, dx\\ &=-\frac {a \tanh ^{-1}(a x)}{6 x^3}+\frac {a^3 \tanh ^{-1}(a x)}{2 x}-\frac {\left (1-a^2 x^2\right )^2 \tanh ^{-1}(a x)^2}{4 x^4}+\frac {1}{12} a^2 \text {Subst}\left (\int \frac {1}{x^2 \left (1-a^2 x\right )} \, dx,x,x^2\right )-\frac {1}{4} a^4 \text {Subst}\left (\int \frac {1}{x \left (1-a^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac {a \tanh ^{-1}(a x)}{6 x^3}+\frac {a^3 \tanh ^{-1}(a x)}{2 x}-\frac {\left (1-a^2 x^2\right )^2 \tanh ^{-1}(a x)^2}{4 x^4}+\frac {1}{12} a^2 \text {Subst}\left (\int \left (\frac {1}{x^2}+\frac {a^2}{x}-\frac {a^4}{-1+a^2 x}\right ) \, dx,x,x^2\right )-\frac {1}{4} a^4 \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )-\frac {1}{4} a^6 \text {Subst}\left (\int \frac {1}{1-a^2 x} \, dx,x,x^2\right )\\ &=-\frac {a^2}{12 x^2}-\frac {a \tanh ^{-1}(a x)}{6 x^3}+\frac {a^3 \tanh ^{-1}(a x)}{2 x}-\frac {\left (1-a^2 x^2\right )^2 \tanh ^{-1}(a x)^2}{4 x^4}-\frac {1}{3} a^4 \log (x)+\frac {1}{6} a^4 \log \left (1-a^2 x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 82, normalized size = 0.92 \begin {gather*} \frac {-a^2 x^2+\left (-2 a x+6 a^3 x^3\right ) \tanh ^{-1}(a x)-3 \left (-1+a^2 x^2\right )^2 \tanh ^{-1}(a x)^2-4 a^4 x^4 \log (x)+2 a^4 x^4 \log \left (1-a^2 x^2\right )}{12 x^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(171\) vs.
\(2(77)=154\).
time = 0.14, size = 172, normalized size = 1.93
method | result | size |
derivativedivides | \(a^{4} \left (-\frac {\arctanh \left (a x \right )^{2}}{4 a^{4} x^{4}}+\frac {\arctanh \left (a x \right )^{2}}{2 a^{2} x^{2}}+\frac {\arctanh \left (a x \right ) \ln \left (a x -1\right )}{4}-\frac {\arctanh \left (a x \right ) \ln \left (a x +1\right )}{4}-\frac {\arctanh \left (a x \right )}{6 a^{3} x^{3}}+\frac {\arctanh \left (a x \right )}{2 a x}-\frac {\ln \left (a x -1\right ) \ln \left (\frac {a x}{2}+\frac {1}{2}\right )}{8}+\frac {\ln \left (a x -1\right )^{2}}{16}-\frac {\left (\ln \left (a x +1\right )-\ln \left (\frac {a x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {a x}{2}+\frac {1}{2}\right )}{8}+\frac {\ln \left (a x +1\right )^{2}}{16}+\frac {\ln \left (a x -1\right )}{6}+\frac {\ln \left (a x +1\right )}{6}-\frac {1}{12 a^{2} x^{2}}-\frac {\ln \left (a x \right )}{3}\right )\) | \(172\) |
default | \(a^{4} \left (-\frac {\arctanh \left (a x \right )^{2}}{4 a^{4} x^{4}}+\frac {\arctanh \left (a x \right )^{2}}{2 a^{2} x^{2}}+\frac {\arctanh \left (a x \right ) \ln \left (a x -1\right )}{4}-\frac {\arctanh \left (a x \right ) \ln \left (a x +1\right )}{4}-\frac {\arctanh \left (a x \right )}{6 a^{3} x^{3}}+\frac {\arctanh \left (a x \right )}{2 a x}-\frac {\ln \left (a x -1\right ) \ln \left (\frac {a x}{2}+\frac {1}{2}\right )}{8}+\frac {\ln \left (a x -1\right )^{2}}{16}-\frac {\left (\ln \left (a x +1\right )-\ln \left (\frac {a x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {a x}{2}+\frac {1}{2}\right )}{8}+\frac {\ln \left (a x +1\right )^{2}}{16}+\frac {\ln \left (a x -1\right )}{6}+\frac {\ln \left (a x +1\right )}{6}-\frac {1}{12 a^{2} x^{2}}-\frac {\ln \left (a x \right )}{3}\right )\) | \(172\) |
risch | \(-\frac {\left (a^{4} x^{4}-2 a^{2} x^{2}+1\right ) \ln \left (a x +1\right )^{2}}{16 x^{4}}+\frac {\left (3 x^{4} \ln \left (-a x +1\right ) a^{4}+6 a^{3} x^{3}-6 x^{2} \ln \left (-a x +1\right ) a^{2}-2 a x +3 \ln \left (-a x +1\right )\right ) \ln \left (a x +1\right )}{24 x^{4}}-\frac {3 a^{4} x^{4} \ln \left (-a x +1\right )^{2}+16 \ln \left (x \right ) a^{4} x^{4}-8 \ln \left (-a^{2} x^{2}+1\right ) a^{4} x^{4}+12 a^{3} x^{3} \ln \left (-a x +1\right )-6 a^{2} x^{2} \ln \left (-a x +1\right )^{2}+4 a^{2} x^{2}-4 a x \ln \left (-a x +1\right )+3 \ln \left (-a x +1\right )^{2}}{48 x^{4}}\) | \(209\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 164 vs.
\(2 (76) = 152\).
time = 0.27, size = 164, normalized size = 1.84 \begin {gather*} -\frac {1}{48} \, {\left (16 \, a^{2} \log \left (x\right ) - \frac {3 \, a^{2} x^{2} \log \left (a x + 1\right )^{2} + 3 \, a^{2} x^{2} \log \left (a x - 1\right )^{2} + 8 \, a^{2} x^{2} \log \left (a x - 1\right ) - 2 \, {\left (3 \, a^{2} x^{2} \log \left (a x - 1\right ) - 4 \, a^{2} x^{2}\right )} \log \left (a x + 1\right ) - 4}{x^{2}}\right )} a^{2} - \frac {1}{12} \, {\left (3 \, a^{3} \log \left (a x + 1\right ) - 3 \, a^{3} \log \left (a x - 1\right ) - \frac {2 \, {\left (3 \, a^{2} x^{2} - 1\right )}}{x^{3}}\right )} a \operatorname {artanh}\left (a x\right ) + \frac {{\left (2 \, a^{2} x^{2} - 1\right )} \operatorname {artanh}\left (a x\right )^{2}}{4 \, x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 108, normalized size = 1.21 \begin {gather*} \frac {8 \, a^{4} x^{4} \log \left (a^{2} x^{2} - 1\right ) - 16 \, a^{4} x^{4} \log \left (x\right ) - 4 \, a^{2} x^{2} - 3 \, {\left (a^{4} x^{4} - 2 \, a^{2} x^{2} + 1\right )} \log \left (-\frac {a x + 1}{a x - 1}\right )^{2} + 4 \, {\left (3 \, a^{3} x^{3} - a x\right )} \log \left (-\frac {a x + 1}{a x - 1}\right )}{48 \, x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.76, size = 102, normalized size = 1.15 \begin {gather*} \begin {cases} - \frac {a^{4} \log {\left (x \right )}}{3} + \frac {a^{4} \log {\left (x - \frac {1}{a} \right )}}{3} - \frac {a^{4} \operatorname {atanh}^{2}{\left (a x \right )}}{4} + \frac {a^{4} \operatorname {atanh}{\left (a x \right )}}{3} + \frac {a^{3} \operatorname {atanh}{\left (a x \right )}}{2 x} + \frac {a^{2} \operatorname {atanh}^{2}{\left (a x \right )}}{2 x^{2}} - \frac {a^{2}}{12 x^{2}} - \frac {a \operatorname {atanh}{\left (a x \right )}}{6 x^{3}} - \frac {\operatorname {atanh}^{2}{\left (a x \right )}}{4 x^{4}} & \text {for}\: a \neq 0 \\0 & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 282 vs.
\(2 (76) = 152\).
time = 0.42, size = 282, normalized size = 3.17 \begin {gather*} -\frac {1}{3} \, {\left (a^{3} \log \left (-\frac {a x + 1}{a x - 1} - 1\right ) - a^{3} \log \left (-\frac {a x + 1}{a x - 1}\right ) + \frac {3 \, {\left (a x + 1\right )}^{2} a^{3} \log \left (-\frac {a x + 1}{a x - 1}\right )^{2}}{{\left (a x - 1\right )}^{2} {\left (\frac {{\left (a x + 1\right )}^{4}}{{\left (a x - 1\right )}^{4}} + \frac {4 \, {\left (a x + 1\right )}^{3}}{{\left (a x - 1\right )}^{3}} + \frac {6 \, {\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}} + \frac {4 \, {\left (a x + 1\right )}}{a x - 1} + 1\right )}} - \frac {{\left (a x + 1\right )} a^{3}}{{\left (a x - 1\right )} {\left (\frac {{\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}} + \frac {2 \, {\left (a x + 1\right )}}{a x - 1} + 1\right )}} + \frac {{\left (\frac {3 \, {\left (a x + 1\right )} a^{3}}{a x - 1} + a^{3}\right )} \log \left (-\frac {a x + 1}{a x - 1}\right )}{\frac {{\left (a x + 1\right )}^{3}}{{\left (a x - 1\right )}^{3}} + \frac {3 \, {\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}} + \frac {3 \, {\left (a x + 1\right )}}{a x - 1} + 1}\right )} a \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.36, size = 246, normalized size = 2.76 \begin {gather*} {\ln \left (1-a\,x\right )}^2\,\left (\frac {\frac {a^2\,x^2}{2}-\frac {1}{4}}{4\,x^4}-\frac {a^4}{16}\right )-\ln \left (1-a\,x\right )\,\left (\ln \left (a\,x+1\right )\,\left (\frac {\frac {a^2\,x^2}{2}-\frac {1}{4}}{2\,x^4}-\frac {a^4}{8}\right )+\frac {3\,a^5\,x-2\,a^4}{24\,a^3\,x^3}-\frac {3\,x\,a^5+2\,a^4}{24\,a^3\,x^3}-\frac {a\,\left (22\,a^3\,x^3-12\,a^2\,x^2+6\,a\,x-4\right )}{96\,x^3}+\frac {a\,\left (44\,a^3\,x^3+24\,a^2\,x^2+12\,a\,x+8\right )}{192\,x^3}\right )-\frac {a^4\,\ln \left (x\right )}{3}+{\ln \left (a\,x+1\right )}^2\,\left (\frac {\frac {a^2\,x^2}{8}-\frac {1}{16}}{x^4}-\frac {a^4}{16}\right )+\frac {a^4\,\ln \left (a^2\,x^2-1\right )}{6}-\frac {a^2}{12\,x^2}+\frac {a\,\ln \left (a\,x+1\right )\,\left (\frac {a^2\,x^2}{4}-\frac {1}{12}\right )}{x^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________